﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:mssdk="winsdk" xmlns:script="urn:script" xmlns:build="urn:build" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Description" content="The !gflag extension sets or displays the global flags."/>
<meta name="MSHAttr" content="PreferredSiteName:MSDN"/>
<meta name="MSHAttr" content="PreferredLib:/library/windows/hardware"/>
<title>!gflag</title>

<meta name="MS-HAID" content="r24_exts_general_A_b1bd8a19-65c6-417e-8ab9-99255bbf4890.xml"/>


<link rel="STYLESHEET" type="text/css" HREF="../common/backsdk4.css"/>





<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
<body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(2249);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../../index.htm?page=debugger/_gflag.htm";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="_for_each_register.htm" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="../template2/btn_prev_n.gif" border="0"></a><A href="_gle.htm" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="../template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="introduction6.htm">Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)</A> &gt; <A href="debugger_reference.htm">Debugger Reference</A> &gt; <A href="debugger_commands.htm">Debugger Commands</A> &gt; <A href="general_extensions.htm">General Extension Commands</A> &gt; </div>
	<div id="winchm_template_title">!gflag</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div id="mainSection"><p>The <b>!gflag</b> extension sets or displays the global flags.</p>
<p></p>
<pre class="syntax"><b>!gflag </b>[<b>+|-</b>]<b> </b><i>Value</i> 
<b>!gflag </b>{<b>+|-</b>}<b> </b><i>Abbreviation</i> 
<b>!gflag -?</b> 
<b>!gflag</b> 
</pre>
<h2><a id="ddk__gflag_dbg"></a><a id="DDK__GFLAG_DBG"></a>Parameters</h2>
<p></p>
<dl>
<dt><a id="_______Value______"></a><a id="_______value______"></a><a id="_______VALUE______"></a>       <i>Value</i>      </dt>
<dd>
<p>Specifies a 32-bit hexadecimal number. If you do not use a plus sign (<b>+</b>) or minus sign (<b>-</b>), this number becomes the new value of the global flag bit field. If you add a plus sign (<b>+</b>) before this number, the number specifies one or more global flag bits to set to 1. If you add a minus sign (<b>-</b>) before this number, the number specifies one or more global flag bits to set to zero.</p>
</dd>
<dt><a id="_______Abbreviation______"></a><a id="_______abbreviation______"></a><a id="_______ABBREVIATION______"></a>       <i>Abbreviation</i>      </dt>
<dd>
<p>Specifies a single global flag. <i>Abbreviation</i> is a three-letter abbreviation for a global flag that is set to 1  (<b>+</b>) or to zero (<b>-</b>).</p>
</dd>
<dt><a id="_______-_______"></a>       <b>-?</b>      </dt>
<dd>
<p>Displays some Help text for this extension, including a list of global flag abbreviations, in the <a href="#Bookmark1223">Debugger Command window</a>.</p>
</dd>
</dl>
<h3><a id="DLL"></a><a id="dll"></a>DLL</h3>
<table>
<tr>
<td>
<p><b>Windows 2000
         </b></p>
</td>
<td>
<p>
<dl>
<dt>
          Kdextx86.dll
          </dt>
<dt>Ntsdexts.dll
         </dt>
</dl>
</p>
</td>
</tr>
<tr>
<td>
<p><b>Windows XP and later
         </b></p>
</td>
<td>
<p>
          Exts.dll
         </p>
</td>
</tr>
</table>
<p> </p>
<h3><a id="Additional_Information"></a><a id="additional_information"></a><a id="ADDITIONAL_INFORMATION"></a>Additional Information</h3>
<p>You can also set these flags by using the Global Flags utility (Gflags.exe).</p>
<h2>Remarks</h2>
<p>If you do not specify any arguments, the <b>!gflag</b> extension displays the current global flag settings.</p>
<p>The following table contains the abbreviations that you can use for the <i>Abbreviation</i> parameter.</p>
<table>
<tr>
<th>Value</th>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td>
<p>0x00000001</p>
</td>
<td>
<p>"soe"</p>
</td>
<td>
<p>Stop on exception.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000002</p>
</td>
<td>
<p>"sls"</p>
</td>
<td>
<p>Show loader snaps.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000004</p>
</td>
<td>
<p>"dic"</p>
</td>
<td>
<p>Debug initial command.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000008</p>
</td>
<td>
<p>"shg"</p>
</td>
<td>
<p>Stop if the GUI stops responding (that is, hangs).</p>
</td>
</tr>
<tr>
<td>
<p>0x00000010</p>
</td>
<td>
<p>"htc"</p>
</td>
<td>
<p>Enable heap tail checking.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000020</p>
</td>
<td>
<p>"hfc"</p>
</td>
<td>
<p>Enable heap free checking.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000040</p>
</td>
<td>
<p>"hpc"</p>
</td>
<td>
<p>Enable heap parameter checking.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000080</p>
</td>
<td>
<p>"hvc"</p>
</td>
<td>
<p>Enable heap validation on call.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000100</p>
</td>
<td>
<p>"ptc"</p>
</td>
<td>
<p>Enable pool tail checking.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000200</p>
</td>
<td>
<p>"pfc"</p>
</td>
<td>
<p>Enable pool free checking.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000400</p>
</td>
<td>
<p>"ptg"</p>
</td>
<td>
<p>Enable pool tagging.</p>
</td>
</tr>
<tr>
<td>
<p>0x00000800</p>
</td>
<td>
<p>"htg"</p>
</td>
<td>
<p>Enable heap tagging.</p>
</td>
</tr>
<tr>
<td>
<p>0x00001000</p>
</td>
<td>
<p>"ust"</p>
</td>
<td>
<p>Create a user-mode stack trace DB.</p>
</td>
</tr>
<tr>
<td>
<p>0x00002000</p>
</td>
<td>
<p>"kst"</p>
</td>
<td>
<p>Create a kernel-mode stack trace DB.</p>
</td>
</tr>
<tr>
<td>
<p>0x00004000</p>
</td>
<td>
<p>"otl"</p>
</td>
<td>
<p>Maintain a list of objects for each type.</p>
</td>
</tr>
<tr>
<td>
<p>0x00008000</p>
</td>
<td>
<p>"htd"</p>
</td>
<td>
<p>Enable heap tagging by DLL.</p>
</td>
</tr>
<tr>
<td>
<p>0x00010000</p>
</td>
<td>
<p>"idp"</p>
</td>
<td>
<p>Unused.</p>
</td>
</tr>
<tr>
<td>
<p>0x00020000</p>
</td>
<td>
<p>"d32"</p>
</td>
<td>
<p>Enable debugging of the Microsoft Win32 subsystem.</p>
</td>
</tr>
<tr>
<td>
<p>0x00040000</p>
</td>
<td>
<p>"ksl"</p>
</td>
<td>
<p>Enable loading of kernel debugger symbols.</p>
</td>
</tr>
<tr>
<td>
<p>0x00080000</p>
</td>
<td>
<p>"dps"</p>
</td>
<td>
<p>Disable paging of kernel stacks.</p>
</td>
</tr>
<tr>
<td>
<p>0x00100000</p>
</td>
<td>
<p>"scb"</p>
</td>
<td>
<p>Enable critical system breaks.</p>
</td>
</tr>
<tr>
<td>
<p>0x00200000</p>
</td>
<td>
<p>"dhc"</p>
</td>
<td>
<p>Disable heap coalesce on free.</p>
</td>
</tr>
<tr>
<td>
<p>0x00400000</p>
</td>
<td>
<p>"ece"</p>
</td>
<td>
<p>Enable close exception.</p>
</td>
</tr>
<tr>
<td>
<p>0x00800000</p>
</td>
<td>
<p>"eel"</p>
</td>
<td>
<p>Enable exception logging.</p>
</td>
</tr>
<tr>
<td>
<p>0x01000000</p>
</td>
<td>
<p>"eot"</p>
</td>
<td>
<p>Enable object handle type tagging.</p>
</td>
</tr>
<tr>
<td>
<p>0x02000000</p>
</td>
<td>
<p>"hpa"</p>
</td>
<td>
<p>Put heap allocations at the end of pages.</p>
</td>
</tr>
<tr>
<td>
<p>0x04000000</p>
</td>
<td>
<p>"dwl"</p>
</td>
<td>
<p>Debug WINLOGON.</p>
</td>
</tr>
<tr>
<td>
<p>0x08000000</p>
</td>
<td>
<p>"ddp"</p>
</td>
<td>
<p>Disable kernel-mode <b>DbgPrint</b> and <b>KdPrint</b> output.</p>
</td>
</tr>
<tr>
<td>
<p>0x10000000</p>
</td>
<td>
<p>NULL</p>
</td>
<td>
<p>Unused.</p>
</td>
</tr>
<tr>
<td>
<p>0x20000000</p>
</td>
<td>
<p>"sue"</p>
</td>
<td>
<p>Stop on unhandled user-mode exception</p>
</td>
</tr>
<tr>
<td>
<p>0x40000000</p>
</td>
<td>
<p>NULL</p>
</td>
<td>
<p>Unused.</p>
</td>
</tr>
<tr>
<td>
<p>0x80000000</p>
</td>
<td>
<p>"dpd"</p>
</td>
<td>
<p>Disable protected DLL verification.</p>
</td>
</tr>
</table>
<p> </p></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2019. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>
